#include "icybuddy.h"

IcyBuddy::IcyBuddy(IcySettings *fSettings)
{
    sScreenName = new QString;
    sAlias = new QString;
    sXStatusHead = new QString;
    sXStatusText = new QString;
    fStatusIcon = new QIcon;
    fXStatusIcon = new QIcon;
    settings = fSettings;
}

IcyBuddy::~IcyBuddy()
{
    delete sScreenName;
    delete sAlias;
    delete sXStatusHead;
    delete sXStatusText;
    delete fStatusIcon;
    delete fXStatusIcon;
}

void IcyBuddy::setStatus(const quint16 u16fStatus)
{
    u16Status = u16fStatus;

    switch ( u16Status ){
        case 0:
            *fStatusIcon = settings->getIcon("status://online");
            break;
        default:
            *fStatusIcon = settings->getIcon("status://offline");
            break;
    }
}

void IcyBuddy::setXStatus(const quint16 u16fXStatus)
{
    u16XStatus = u16fXStatus;
}
